home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-04-16 | 612 b | 34 lines | [TEXT/????] |
- #!/bin/sh
-
- # Construct a segment of a Makefile for a library.
- # Writes to stdout.
- #
- # usage: putlibmf target $(SRCS)
-
- # Check that we have enough arguments
- #
- case $# in
- 0|1) echo "usage: $0 target $(SRCS)" 1>&2; exit 2;;
- esac
-
-
- # Extract arguments; remaining arguments are source files
- #
- TARGET=$1; shift
-
- putobjs "OBJS" $*
-
- # Construct rule to build target
- #
- echo
- echo "$TARGET: \$(OBJS)"
- echo " ar cr @$TARGET \$(OBJS)"
- echo " @echo never mind if ranlib does not exist -- probably SYSV"
- echo " -ranlib @$TARGET"
- echo " mv @$TARGET $TARGET"
- # ^^these are tabs!
- echo
- echo ".PRECIOUS: $TARGET"
-
- puttargets $*
-